import { defineComponent, PropType } from 'vue'
import { Schema, SchemaTypes } from './types'

export default defineComponent({
  props: {
    schema: {
      type: Object as PropType<Schema>
    }
  },
  name: 'SchemaForm',
  setup(props:any, /*{slots:any, emit, attrs}*/){
    return ()=>{
      const schema = props.schema;
      const type = schema?.type;
      switch (type) {
        case SchemaTypes.STRING: {
          return <input type='text' name='' id=''/>
        }
      }
      return (
        <div>this is form</div>
      )
    }
  }
})